import {
	request
} from '@/utils/request.js'

// 登录
export function loginApi(data) {
	return request({
		url: '/user/login',
		method: 'POST',
		data,
		isAuth: false
	})
}

// 微信登录
export function wxLoginApi(data) {
	return request({
		url: '/user/wxLogin',
		method: 'POST',
		data,
		isAuth: false
	})
}

// 获取区域列表
export function getRegionListApi(data) {
	return request({
		url: '/region/getRegionList',
		data
	})
}

// 获取门店列表
export function getStoreListApi(data) {
	return request({
		url: '/store/getStoreList',
		data
	})
}

// 获取门店详情
export function getStoreDetailsApi(data) {
	return request({
		url: '/store/getStoreDetails',
		data
	})
}

// 获取首页数据
export function getIndexInfoApi(data) {
	return request({
		url: '/index/index',
		data
	})
}

// 个人中心
export function personalCenterApi(data) {
	return request({
		url: '/user/personalCenter',
		data
	})
}

// 退出登录
export function logOutApi(data) {
	return request({
		url: '/user/logout',
		data
	})
}

// 重置密码
export function resetPasswordApi(data) {
	return request({
		url: '/user/resetPassword',
		method: 'POST',
		data
	})
}

// 获取工作台数据
export function getWorkbenchDataApi(data) {
	return request({
		url: '/common/getWorkbenchData',
		data
	})
}

// 获取客户列表
export function getCustomerListApi(data) {
	return request({
		url: '/customer/getCustomerList',
		data
	})
}

// 获取客户详情
export function getCustomerDetailsApi(data) {
	return request({
		url: '/customer/getCustomerDetails',
		data
	})
}

// 添加客户/编辑客户
export function addCustomerApi(data) {
	return request({
		url: '/customer/addCustomer',
		method: 'POST',
		data
	})
}

// 获取预约列表
export function getReserveListApi(data) {
	return request({
		url: '/reserve/getReserveList',
		data
	})
}

// 立即预约/预约修改
export function addReserveApi(data) {
	return request({
		url: '/reserve/addReserve',
		method: 'POST',
		data
	})
}

// 获取取消原因列表
export function getCancelListApi(data) {
	return request({
		url: '/reserve/getCancelList',
		data
	})
}

// 取消预约
export function cancelReserveApi(data) {
	return request({
		url: '/reserve/cancelReserve',
		method: 'POST',
		data
	})
}

// 获取预约详情
export function getReserveDetailsApi(data) {
	return request({
		url: '/reserve/getReserveDetails',
		data
	})
}

// 获取品牌列表
export function getBrandListApi(data) {
	return request({
		url: '/brand/getBrandList',
		data
	})
}

// 获取车型列表
export function getModelListApi(data) {
	return request({
		url: '/model/getModelList',
		data
	})
}

// 获取分类列表
export function getCategoryListApi(data) {
	return request({
		url: '/goods_category/getCategoryList',
		data
	})
}

// 获取套餐列表
export function getPackageListApi(data) {
	return request({
		url: '/package/getPackageList',
		data
	})
}

// 获取套餐详情
export function getPackageDetailsApi(data) {
	return request({
		url: '/package/getPackageDetails',
		data
	})
}

// 获取商品列表
export function getGoodsListApi(data) {
	return request({
		url: '/goods/getGoodsList',
		data
	})
}

// 商品详情
export function getGoodsDetailsApi(data) {
	return request({
		url: '/goods/getGoodsDetails',
		data
	})
}

// 服务项目检索
export function getProjectListByKeywordApi(data) {
	return request({
		url: '/common/getProjectListByKeyword',
		method: 'POST',
		data
	})
}

// 检索全部服务
export function getAllProjectListByKeywordApi(data) {
	return request({
		url: '/common/getAllProjectListByKeyword',
		data
	})
}

// 全部商品
export function getAllGoodsApi(data) {
	return request({
		url: '/goods/getAllGoods',
		data
	})
}

// 获取订单列表
export function getOrderListApi(data) {
	return request({
		url: '/order/getOrderList',
		data
	})
}

// 获取施工师傅列表
export function getRepairListApi(data) {
	return request({
		url: '/order/getRepairList',
		data
	})
}

// 生成订单
export function addOrderApi(data) {
	return request({
		url: '/order/addOrder',
		method: 'POST',
		data
	})
}

// 获取订单详情
export function getOrderDetailsApi(data) {
	return request({
		url: '/order/getOrderDetails',
		data
	})
}

// 订单修改
export function editOrderApi(data) {
	return request({
		url: '/order/editOrder',
		method: 'POST',
		data
	})
}

// 开始施工
export function startApi(data) {
	return request({
		url: '/order/start',
		method: 'POST',
		data
	})
}

// 获取订单日志
export function getOrderLogApi(data) {
	return request({
		url: '/order/getOrderLog',
		data
	})
}

// 订单支付
export function payOrderApi(data) {
	return request({
		url: '/order/payOrder',
		method: 'POST',
		data
	})
}

// 确认交车
export function finishApi(data) {
	return request({
		url: '/order/finish',
		method: 'POST',
		data
	})
}

// 质检完成
export function checkApi(data) {
	return request({
		url: '/order/check',
		method: 'POST',
		data
	})
}

// 施工完成
export function endApi(data) {
	return request({
		url: '/order/end',
		method: 'POST',
		data
	})
}

// 质保单查询结果
export function getWarrantyDetailsApi(data) {
	return request({
		url: '/warranty/getWarrantyDetails',
		data
	})
}

// 检索门店
export function getStoreByKeywordApi(data) {
	return request({
		url: '/store/getStoreByKeyword',
		data
	})
}

// 获取分润列表
export function getPartirunListApi(data) {
	return request({
		url: '/partirun/getPartirunList',
		data
	})
}

// 获取分润详情
export function getPartirunDetailsApi(data) {
	return request({
		url: '/partirun/getPartirunDetails',
		data
	})
}

// 获取门店库存
export function getStockDetailsApi(data) {
	return request({
		url: '/stock/getStockDetails',
		data
	})
}

// 获取入库记录列表
export function getStockLogListApi(data) {
	return request({
		url: '/stock/getStockLogList',
		data
	})
}

// 获取入库记录详情
export function getStockLogDetailsApi(data) {
	return request({
		url: '/stock/getStockLogDetails',
		data
	})
}

// 入库确认
export function confirmLogApi(data) {
	return request({
		url: '/stock/confirmLog',
		method: 'POST',
		data
	})
}

// 获取门店信息
export function getStoreInfoApi(data) {
	return request({
		url: '/store/getStoreInfo',
		method: 'get',
		data
	})
}

// 数据中心
// 获取业务类型
export function getGoodsTypeListApi(data) {
	return request({
		url: '/goods_type/getGoodsTypeList',
		method: 'get',
		data
	})
}

// 获取销售人员列表
export function getSaleListApi(data) {
	return request({
		url: '/user/getSaleList',
		method: 'get',
		data
	})
}

// 获取数据中心数据
export function getDataCenterApi(data) {
	return request({
		url: '/data_center/getDataCenter',
		method: 'get',
		data
	})
}